import request from '@/utils/request'

// 查询首页轮播广告列表
export function listHome_adv(params) {
  return request({
    url: '/admin/api/home_adv/list',
    method: 'get',
    params
  })
}

// 查询首页轮播广告详细
export function getHome_adv(id) {
  return request({
    url: '/admin/api/home_adv/' + id,
    method: 'get'
  })
}

// 新增首页轮播广告
export function addHome_adv(data) {
  return request({
    url: '/admin/api/home_adv/add',
    method: 'post',
    data
  })
}

// 修改首页轮播广告
export function updateHome_adv(data) {
  return request({
    url: '/admin/api/home_adv/update',
    method: 'put',
    data
  })
}

export function updateAdvStatus(data) {
  return request({
    url: '/admin/api/home_adv/update/status',
    method: 'put',
    data
  })
}

// 删除首页轮播广告
export function delHome_adv(data) {
  return request({
    url: '/admin/api/home_adv/delete',
    method: 'delete',
    data
  })
}
